//
//  Stack.swift
//  Utility
//
//  Created by yuhus on 2024/1/2.
//

import Foundation

public struct Stack<Element> {
  public var items: [Element] = []
  
  public init() {}
  
  public mutating func push(_ item: Element) {
    items.append(item)
  }
  
  public mutating func pop() -> Element {
    return items.removeLast()
  }
}
